package com.tl.satoken.domain.entity;

import com.tl.satoken.enums.MessageType;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.io.Serializable;

@AllArgsConstructor
@Data
public class GameMessage implements Serializable {
    private static final long serialVersionUID = 1L;
    private MessageType type;   // 消息类型
    private String from;
    private String roomId;
    private Object data; 
    private Integer heroId;     // 英雄ID
    private String animation;   // 动画
    private Position position;  // 位置 x , y, z
    private Rotation rotation;  // 旋转
    private String image;       // 表情包图片
    private String id;          // 金币ID

    public GameMessage() {
    }

    public GameMessage(MessageType type, String from, String roomId, Object data) {
        this.type = type;
        this.from = from;
        this.roomId = roomId;
        this.data = data;
    }
}

